import CacheUtils from "@/utils/CacheUtils";

const user = {
    namespaced: true,
    state: {
        /* 用户信息 */
        user: {},
    },
    mutations: {
        changeUser(state, user) {
            CacheUtils.setCache("user", user);
            state.user = user
        },
    },
    getters: {

    },
    actions: {
        async getUser(context) {
            // const res = await VipService.get();
            const res = {};
            context.commit('changeUser', res)
        },
    }
};
export default user;
